From: Marco Trevisan (Treviño) Date: Sun, 31 Aug 2025 00:55:13 +0000 (+0200) Subject: js: Use DesktopAppInfo from GioUnix X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~95^2^2~49 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=3041605120456166544753396137580a23a055d2;p=gnome-shell.git js: Use DesktopAppInfo from GioUnix The type was never part of Gio, but it's an Unix specific type, so use the platform-specific typelib instead. This would still work in gjs for 49 but would trigger a warning. See: https://gitlab.gnome.org/GNOME/glib/-/issues/3744 See: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4761 See: https://gitlab.gnome.org/GNOME/gjs/-/merge_requests/1018 Part-of: --- diff --git a/js/misc/parentalControlsManager.js b/js/misc/parentalControlsManager.js index cd5353154..55ffed246 100644 --- a/js/misc/parentalControlsManager.js +++ b/js/misc/parentalControlsManager.js @@ -127,7 +127,7 @@ const ParentalControlsManager = GObject.registerClass({ return this._initialized; } - // Calculate whether the given app (a Gio.DesktopAppInfo) should be shown + // Calculate whether the given app (a GioUnix.DesktopAppInfo) should be shown // on the desktop, in search results, etc. The app should be shown if: // - The .desktop file doesn’t say it should be hidden. // - The executable from the .desktop file’s Exec line isn’t denied in diff --git a/js/ui/main.js b/js/ui/main.js index 0de79d6a1..40898e15c 100644 --- a/js/ui/main.js +++ b/js/ui/main.js @@ -1,5 +1,6 @@ import Clutter from 'gi://Clutter'; import Gio from 'gi://Gio'; +import GioUnix from 'gi://GioUnix'; import GLib from 'gi://GLib'; import GObject from 'gi://GObject'; import Meta from 'gi://Meta'; @@ -169,7 +170,7 @@ export async function start() { let currentDesktop = GLib.getenv('XDG_CURRENT_DESKTOP'); if (!currentDesktop || !currentDesktop.split(':').includes('GNOME')) - Gio.DesktopAppInfo.set_desktop_env('GNOME'); + GioUnix.DesktopAppInfo.set_desktop_env('GNOME'); sessionMode = new SessionMode.SessionMode(); sessionMode.connect('updated', _sessionUpdated); diff --git a/js/ui/remoteSearch.js b/js/ui/remoteSearch.js index dbd0494ec..b7247cab5 100644 --- a/js/ui/remoteSearch.js +++ b/js/ui/remoteSearch.js @@ -1,5 +1,6 @@ import GdkPixbuf from 'gi://GdkPixbuf'; import Gio from 'gi://Gio'; +import GioUnix from 'gi://GioUnix'; import GLib from 'gi://GLib'; import Shell from 'gi://Shell'; import St from 'gi://St'; @@ -96,7 +97,7 @@ export function loadRemoteSearchProviders(searchSettings) { let appInfo = null; try { let desktopId = keyfile.get_string(group, 'DesktopId'); - appInfo = Gio.DesktopAppInfo.new(desktopId); + appInfo = GioUnix.DesktopAppInfo.new(desktopId); if (!appInfo.should_show()) return; } catch {